package com.zziq.mianshi.constant;

/**
 * redis常量
 */
public interface RedisConstant {
    /**
     * 用户签到记录 redis key 前缀
     */
    String USER_SIGN_IN_REDIS_KEY_PREFIX = "user:signins";

    /** @Title: getUserSignInRedisKeyPrefix
     * @Author: Mr·zziq
     * @Date: 2024-12-07 17:14:41
     * @Params: [year, userId] 
     * @Return: String 
     *
     * @Description: 获取用户签到记录的 reidis key
     */
    static String getUserSignInRedisKeyPrefix(int year,long userId){
        return String.format("%s:%s:%s",
                        USER_SIGN_IN_REDIS_KEY_PREFIX
                        ,year
                        ,userId);
    }
}
